using AutoMapper;
using MESBaseis.Domain.XZY;

namespace ConsoleApi.Models
{
    /// <summary>
    /// AutoMapper映射配置
    /// </summary>
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            // 通知公告映射
            CreateMap<AnnouncementModel, AnnouncementDto>();
            CreateMap<AnnouncementDto, AnnouncementModel>();

            // 采购订单映射
            CreateMap<PurchaseOrderModel, PurchaseOrderDto>();
            CreateMap<PurchaseOrderDto, PurchaseOrderModel>();

            // 生产工单映射
            CreateMap<ProductionOrderModel, ProductionOrderDto>();
            CreateMap<ProductionOrderDto, ProductionOrderModel>();

            // 销售订单映射
            CreateMap<ProductionSalesOrderModel, ProductionSalesOrderDto>();
            CreateMap<ProductionSalesOrderDto, ProductionSalesOrderModel>();

            // 审批单据映射
            CreateMap<ApprovalDocumentModel, ApprovalDocumentDto>();
            CreateMap<ApprovalDocumentDto, ApprovalDocumentModel>();

            // 核心指标映射
            CreateMap<CoreMetricsModel, CoreMetricsDto>();
            CreateMap<CoreMetricsDto, CoreMetricsModel>();

            // 统计数据映射
            CreateMap<StatisticsModel, StatisticsDto>();
            CreateMap<StatisticsDto, StatisticsModel>();

            // 仓库映射
            CreateMap<WarehouseModel, WarehouseDto>();
            CreateMap<WarehouseDto, WarehouseModel>();

            // 生产物品映射
            CreateMap<ProductionItemModel, ProductionItemDto>();
            CreateMap<ProductionItemDto, ProductionItemModel>();

            // 工序映射
            CreateMap<ProcessModel, ProcessDto>();
            CreateMap<ProcessDto, ProcessModel>();
        }
    }
} 